1. Field of the Invention
This invention relates generally to continuous processing systems that process streaming data, and, more specifically, to order of execution in a continuous processing system.
2. Description of the Background Art
A continuous processing system processes streaming data. It includes statements (such as queries), written by programmers, which operate continuously on input data streams and which publish to output data streams. In such system, it is difficult to achieve predictable and repeatable output results.
When statements written by programmers are compiled, an execution graph is created, where the execution graph is comprised of connected primitives that correspond to the compiled statements. An execution graph in continuous processing systems specifies the path for processing messages in accordance with the statements. It is common, and sometimes necessary, in such systems to process primitives associated with statements in parallel and “join” the output of such primitives with “joiner” primitives as appropriate. FIG. 1a illustrates a “Fork and join” where messages coming from “Fork” 110 can come to “Join” 120 through Path 1 or Path 2.
Having a “fork and join” in an execution graph can result in unpredictable and unrepeatable output results. For instance in the execution graph illustrated in FIG. 1b, any of the following can happen:                “Message 1” goes into Joiner “J1”, slot 1, before “Message 2” goes into window “W2”;        “Message 1” goes into Joiner “J1”, slot 1, after “Message 2” goes into window “W2”;        “Message 2” goes into Joiner “J1”, slot 1, before “Message 1” goes into window “W1”;        “Message 2” goes into Joiner “J1”, slot 2, after “Message 1” goes into window “W1.”Therefore, there is a need for a method for executing primitives (including “fork and join” primitives) in a manner that will produce predictable and repeatable output results.        